// 类型定义
export interface IOptions {
  label: string;
  value: string;
}

export interface NameLocalization {
  zh_CN: string;
}

export interface ProjectOverviewResponse {
  name: NameLocalization;
  code: string;
  projectTypeId: string;
  plannedStartTime: string;
  plannedEndTime: string;
  plannedDurationDay: string;
  actualStartTime: string;
  actualEndTime: string;
  actualDurationDay: string;
  remark: string;
  cover: string;
}

export interface ProjectTypeItem {
  id: string;
  name?: NameLocalization;
}

export interface ProjectTypeListResponse {
  result?: ProjectTypeItem[];
}

export interface EditBaseInfoParams {
  id: string;
  name: NameLocalization;
  code: string;
  projectTypeId: string;
  plannedStartTime: string;
  plannedEndTime: string;
  plannedDurationDay: string;
  actualStartTime: string;
  actualEndTime: string;
  actualDurationDay: string;
  remark: string;
  cover: string;
}

export interface FormSchemaItem {
  component: string;
  prop: keyof FormData;
  label: string;
  type?: string;
  rules?: Array<{
    required?: boolean;
    message: string;
    trigger: string;
  }>;
  showWordLimit?: boolean;
  maxlength?: string;
  options?: IOptions[];
  startPlaceholder?: string;
  endPlaceholder?: string;
  unit?: string;
}

export interface FormData {
  name: string;
  code: string;
  projectTypeId: string;
  plannedDate: string[];
  plannedDurationDay: string;
  plannedDurationDayUnit: string;
  actualDurationDay: string;
  actualDurationDayUnit: string;
  actualDate: string[];
  remark: string;
  cover: string;
}
